<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:75:"/data/wwwroot/luckyDraw/m/public/../application/view/index/personaldata.php";i:1495004909;}*/ ?>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <!-- uc强制竖屏 -->
    <meta name="screen-orientation" content="portrait">
    <!-- QQ强制竖屏 -->
    <meta name="x5-orientation" content="portrait">
    <title>我的资料</title>
    <link rel="stylesheet" href="<?php echo \think\Config::get('resources'); ?>/css/bootstrap.css">
    <link rel="stylesheet" href="<?php echo \think\Config::get('resources'); ?>/css/font-awesome.css">
    <link rel="stylesheet" href="<?php echo \think\Config::get('resources'); ?>/css/cl-style.css">
</head>
<body>
    <div class="container-fluid">
        <div class="row">
            <header class="cl-Forgetpasswd-header">
                <ul>
                    <li class="col-xs-3"><a href="<?php echo url('index'); ?>"><i class="fa fa-chevron-left"> 返回</i></a></li>
                    <li class="col-xs-6 text-center"><span class="text-center">个人设置</span></li>
                    <li class="col-xs-3"></li>
                </ul>
            </header>
        </div>
    </div>
   <div class="container-fluid">

       <div class="cl-personalData-box">

       <form class="form-horizontal" method="post" action="<?php echo url('personaldata'); ?>" enctype="multipart/form-data">

           <div class="form-group">
               <label for="nicheng" class="col-xs-3 control-label text-right  h6">昵称:</label>
               <div class="col-xs-9">
                   <input type="text"class="form-control" id="nicheng" name="nickname" placeholder="会员昵称" value="<?php echo $userInfo['nickname']; ?>">
                   <i class="fa fa-user cl-form-icon" aria-hidden="true"></i>
                   <span class="sr-only">昵称</span>
               </div>
           </div>
           <div class="form-group">
               <label for="youxiang" class="col-xs-3 control-label text-right  h6">邮箱:</label>
               <div class="col-xs-9">
                   <input type="email" class="form-control" id="youxiang" placeholder="邮箱" name="email" value="<?php echo $userInfo['email']; ?>">
                   <span class="fa fa-envelope-o cl-form-icon" aria-hidden="true"></span>
                   <span class="sr-only">邮箱</span>
               </div>
           </div>
           <div class="form-group">
               <label for="qqNumber" class="col-xs-3 control-label text-right  h6">QQ号:</label>
               <div class="col-xs-9">
                   <input type="text"class="form-control" id="qqNumber" placeholder="qq号码" name="qq" value="<?php echo $userInfo['qq']; ?>">

                   <span class="sr-only">QQ号:</span>
               </div>
           </div>

           <div class="form-group">
               <label for="qianming" class="col-xs-3 control-label text-right  h6">签名:</label>
               <div class="col-xs-9">
                   <textarea class="form-control" rows="3" id="qianming" name="signature"><?php echo $userInfo['signature']; ?></textarea>


               </div>
           </div>
           <div class="form-group">
               <label for="touxiang" class="col-xs-3 control-label text-right  h6">头像:</label>
               <div class="col-xs-9">
                   <div class="uploader white">
                       <input type="text" id="filename" name="filename" class="filename" readonly="readonly"/>
                       <input type="button" name="file" class="button" id="touxiang" value="上传..." />
                       <input type="file" size="30" id="fileInfo" name="fileInfo" />
                   </div>


                   <span  class="sr-only">头像:</span>
               </div>
           </div>
           <div class="form-group">
               <div class="container-fluid">

                   <button type="submit" class="btn btn-warning btn-block">修改</button>
               </div>
           </div>
       </form>

       </div>
   </div>



</body>
<script type="text/javascript" src="<?php echo \think\Config::get('resources'); ?>/js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="<?php echo \think\Config::get('resources'); ?>/js/bootstrap.min.js"></script>
<script>
$(function(){
    $("input[type=file]").change(function(){$(this).parents(".uploader").find(".filename").val($(this).val());});
    $("input[type=file]").each(function(){
        if($(this).val()==""){$(this).parents(".uploader").find(".filename").val("上传您的头像...");}
    });
});
</script>
<script type="text/javascript">
  function confirm_edit(){
    var filepath=$("#fileInfo").val();
    var extStart=filepath.lastIndexOf(".");
    var ext=filepath.substring(extStart,filepath.length).toUpperCase();
    if(ext!=".BMP"&&ext!=".PNG"&&ext!=".GIF"&&ext!=".JPG"&&ext!=".JPEG"){
     alert("图片限于bmp,png,gif,jpeg,jpg格式");
     return false;
    }else{
      var img=new Image();
      img.src=filepath; 
      if(img.filesize>1*1024){      
        alert("图片不大于50KB。");
        return false;
      }else{
        return true;
      } 
    }
  }
</script>
<script charset="utf-8" type="text/javascript" src="<?php echo \think\Config::get('resources'); ?>/js/baidu_count.js"></script>
</html>